package cn.com.idmy.base;


import cn.com.idmy.base.config.DefaultConfig;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.Accessors;

@Getter
@Accessors(fluent = true)
@AllArgsConstructor
public enum DefaultError implements Err {
    DEFAULT(DefaultConfig.defaultErrCode, DefaultConfig.defaultErrMsg),
    SYSTEM(DefaultConfig.defaultErrCode, DefaultConfig.defaultErrMsg),
    UNAUTHORIZED(401, "未登录"),
    FORBIDDEN(403, "没有权限访问该资源"),
    IDEMPOTENT(10, "幂等异常"),
    UPDATE(20, "更新失败"),
    DELETE(30, "删除失败"),
    SERVICE(40, "Service 错误"),
    DAO(50, "Dao 错误"),
    REDIS(60, "Redis 错误"),
    MQ(70, "MQ 错误");

    private final int code;
    private final String msg;
}
